package com.k2data.k2app.rest;

import com.google.common.collect.Lists;
import com.k2data.k2app.rest.domain.DictRest;
import com.k2data.k2app.rest.domain.RectList;
import com.k2data.k2app.rest.domain.Region;
import com.k2data.k2app.rest.domain.RegionRest;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author lidong9144@163.com 17-6-15.
 */
@Component
public class SysClientFallback implements SysClient {

    @Override
    public DictRest get(String type) {
        DictRest rest = new DictRest();
        rest.setCode(200000);
        rest.setMessage("Success");
        rest.setResult(Lists.newArrayList());

        return rest;
    }

    @Override
    public RectList getRolesByUser (@PathVariable("id") Long id) {
        RectList rectObject = new RectList();
        return rectObject.initDeviceRectList();
    }

    @Override
    public RegionRest getRegion(String code, String province, String city, String district) {
        RegionRest rest = new RegionRest();
        rest.setCode(200000);
        rest.setMessage("Success");
        rest.setResult(new Region());

        return rest;
    }

}
